/**
  (c) Copyright Gavin Bong 2008

  This work ‘as-is’ we provide.
  No warranty express or implied.
  We’ve done our best,
  to debug and test.
  Liability for damages denied.

  Permission is granted hereby,
  to copy, share, and modify.
  Use as is fit,
  free or for profit.
  These rights, on this notice, rely.
  
  http://genaud.net/2005/10/poetic-license/
 */

package net.boingboing;

import del.icio.us.Delicious;

public class BookmarkRepository 
{
    private Delicious _repo;

    BookmarkRepository( String u, String p )
    {
        _repo = new Delicious( u, p );
    }
    
    void saveBookmark( Bookmark bm )
    {
        if( bm == null )
            return;
        
        _repo.addPost( bm.getUrl(), bm.getShortText(), bm.getExtended(), bm.getSpaceDelimitedTags(), new java.util.Date() );
    }
}
